package org.example.provider.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.example.commonapi.service.TimeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@RestController
public class TimeController {

    @DubboReference
    private TimeService timeService;

    @GetMapping("/")
    public LocalDateTime getTime() {
        return timeService.getDateTime();
    }
}
